home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Plug-In Power Pack for Netscape Communicator
/
Plug-In Power Pack for Netscape Communicator.iso
/
plugins
/
dataviews
/
dvtools
/
demos
/
surfdemo
/
surfmain.c
< prev
next >
Wrap
C/C++ Source or Header
|
1997-07-10
|
2KB
|
87 lines
#ifndef lint
static char SccsId[]= "@(#)surfmain.c V1.7 3/17/95";
#endif
/*------------------------------------------------------------------
| file name -- main.c
|-----------------------------------------------------------------*/
#include "std.h"
#include "dvstd.h"
#include "dvtools.h"
#include "Tfundecl.h"
#include "surfdata.h"
#include "surffundecl.h"
#ifdef WINNT
#include <windows.h>
#endif /* WINNT */
#define SEARCH_PATH (CHAR*)NULL
#define DISPFORM_TABLE (CHAR*)NULL
/********************** Function Declarations ***********************/
VOID InitData (), InitDisplay (), InitSimpleEvents (), InitInputObjects (), GenerateData (), DrawDisplay (), HandleEvents (), TermDisplays ();
/*--------------------------------------------------------------------
| main()
| This module is the basic skeleton of a DataViews application.
|
*/
#ifdef WINNT
int APIENTRY WinMain(HANDLE hInstance, HANDLE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
CHAR *device = "W";
#else /* Not WINNT */
int
main (argc, argv)
int argc;
char *argv[];
{
CHAR *device = NULL;
/* Initialize Arguments, argv[1] - display device (default is DVDEVICE) */
if (argc > 1)
device = argv[1];
#endif /* WINNT */
/* Initialize */
/* DataViews Initializaton */
(VOID) TInit (SEARCH_PATH, DISPFORM_TABLE);
/* Application Specific Initialization */
InitDisplay (device); /* found in surfdsp.c */
InitSimpleEvents (); /* found in surfevents.c */
InitInputObjects (); /* found in surfinput.c */
/* Draw the initial display */
InitData (); /* found in surfeqns.c */
GenerateData (FIRST_TIME); /* found in surfeqns.c */
DrawDisplay (FIRST_TIME); /* found in surfdsp.c */
/* Control Loop */
QuitStatus = (DV_BOOL) NO;
while (QuitStatus == NO)
{
/* Gather and Process User Inputs */
HandleEvents (); /* found in surfevents.c */
}
/* Termination and Clean Up */
TermDisplays (); /* found in surfdsp.c */
(VOID) TTerminate (); /* DataViews Termination */
exit( EXIT_OK );
return 1;
}